extends layout 

block content
  h1= title 

  if bookinstance_list.length 
    ul 
      each val in bookinstance_list
        li
          a(href=val.url) #{val.book.title} : #{val.imprint} -&nbsp;
          if val.status == 'Available'
            span.text-sucess #{val.status}
          else if val.status == 'Maintenance'
            span.text-danger #{val.status}
          else
            span.text-warning #{val.status}
          if val.status!='Available'
            span  (Due: #{val.due_back_formatted} )
  else 
    p There are no book copies in this library.